//
//  Service+Content.h
//  huimei
//
//  Created by fengyn on 16/1/18.
//  Copyright © 2016年 lexingsoft. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ServiceManager.h"

///首页默认排序
static NSString * kContentTypeFirstDefault = @"FIRSTPAGE_DEFAULT";
///首页热度排序
static NSString * kContentTypeFirstHot = @"FIRSTPAGE_HOT";
///日记默认排序
static NSString * kContentTypeNoteDefault = @"DIARYBOOK_DEFFAULT";
///日记热度排序
static NSString * kContentTypeNoteHot = @"DIARYBOOK_HOT";
///问答_已有答案
static NSString * kContentTypeQuestionAnwsered = @"QUESTION_ANWSERED";
///问答_无答案
static NSString * kContentTypeQuestioNotAanwsered = @"QUESTION_NOTANWSERED";

///内容搜索分类-首页帖子
static NSString * kContentSearchTypeTopic = @"TOPIC";
///内容搜索分类-日记本
static NSString * kContentSearchTypeNote = @"DIARYBOOK";
///内容搜索分类-问答
static NSString * kContentSearchTypeQuestion = @"QUESTION";

@interface ServiceManager(Content)
///根据帖子查询帖子详情
+ (void)getContentDetailInfoWithId:(NSString *)theId success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///根据帖子类型分页查询帖子
+ (void)getContentWithType:(NSString *)contentType pageIndex:(NSUInteger)pageIndex success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///根据类型和关键字搜索帖子
+ (void)searchContentWithString:(NSString *)stringValue type:(NSString *)type pageIndex:(NSUInteger)pageIndex success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///获取热门搜索
+ (void)getHotSearchSuccess:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///获取搜索历史记录
+ (NSArray *)getSearchHistory;

///发布问题
+ (void)publishQuestionWithTitle:(NSString *)title body:(NSString *)body categoryCode:(NSString *)categoryCode imageUrls:(NSArray<NSString *> *)imageUrls success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///发布专栏
+ (void)publishCollumnWithTitle:(NSString *)title body:(NSString *)body imageUrls:(NSArray<NSString *> *)imageUrls success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///发布SayHi
+ (void)publishSayHiWithTitle:(NSString *)title body:(NSString *)body imageUrls:(NSArray<NSString *> *)imageUrls success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///发布日记
+ (void)publishDiaryWithDiaryBookId:(NSString *)diaryBookId date:(NSString *)publishDate body:(NSString *)body imageUrls:(NSArray<NSString *> *)imageUrls success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///查询我的专栏
+ (void)getMySpecialColumnWithType:(NSString *)type pageIndex:(NSInteger)pageIndex success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///查询我的日记，SayHi，提问
+ (void)getMySayHiWithType:(NSString*)type pageIndex:(NSInteger)pageIndex success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///根据ID删除帖子
+ (void)deleteContentWithId:(NSString *)theId success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///对帖子点赞
+ (void)upvoteContentWithId:(NSString *)theId success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///是否已对资讯点过赞
+ (BOOL)isUpvotedContentWithID:(NSString *)newsId;

//发布自定义模板库 
+ (void)publishTemplateWithCategoryCode:(NSString *)CategoryCode templateTitle:(NSString *)templateTitle tempalteContent:(NSString *)tempalteContent uccess:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
@end


